package com.jd.sunny.java.designpattern.singleton;

/**
 * @author :����
 * @ClassName:Singleton
 * @Description: �������ģʽ----����ģʽ
 * @date :2012-8-23����10:19:46
 */
public class Singleton {

    /**
     * ����һ��˽�б������
     */
    private static Singleton singleton = null;

    /**
     * ˽�л����췽��
     */
    private Singleton() {

    }

    /**
     * ����һ���ȡ�������ľ�̬����,���߳��»����synchronized
     */
    public static Singleton getInstance() {

        if (singleton == null) {
            singleton = new Singleton();
        }
        return singleton;
    }

}
